Namespaces

Classes

Functions

array|string|null
__(string|null $key = null, array $replace = [], string|null $locale = null)

Translate the given message.

at line 989
never
abort(mixed $code, string $message = '', array $headers = [])

Throw an HttpException with the given data.

at line 73
void
abort_if(bool $boolean, mixed $code, string $message = '', array $headers = [])

Throw an HttpException with the given data if the given condition is true.

at line 95
void
abort_unless(bool $boolean, mixed $code, string $message = '', array $headers = [])

Throw an HttpException with the given data unless the given condition is true.

at line 114
string
action(array|string $name, mixed $parameters = [], bool $absolute = true)

Generate the URL to a controller action.

at line 128
Application : mixed))
app(string|null $abstract = null, array $parameters = [])

Get the available container instance.

at line 144
string
app_id()

Get the configured application identifier for config defaults.

at line 162
string
app_path(string $path = '')

Get the path to the application folder.

at line 186
array
append_config(array $array)

Assign high numeric IDs to a config item to force appending.

at line 25
string
asset(string $path, bool|null $secure = null)

Generate an asset path for the application.

at line 202
auth(string|null $guard = null)

Get the auth manager or a specific guard instance.

at line 214
back(int $status = 302, array $headers = [], mixed $fallback = false)

Create a new redirect response to the previous location.

at line 228
string
base_path(string $path = '')

Get the path to the base of the install.

at line 238
string
bcrypt(string $value, array $options = [])

Hash the given value against the bcrypt algorithm.

at line 254
bool
blank(mixed $value)

Determine if the given value is "blank".

at line 51
broadcast(mixed $event = null)

Begin broadcasting an event.

at line 264
broadcast_if(bool $boolean, mixed $event = null)

Begin broadcasting an event if the given condition is true.

at line 274
broadcast_unless(bool $boolean, mixed $event = null)

Begin broadcasting an event unless the given condition is true.

at line 288
mixed
cache(mixed $key = null, mixed $default = null)

Get / set the specified cache value.

at line 306
bool
canPreserveConditionalTarget(ReflectionClassDocblockContext|ReflectionMethodDecorator $method, TypeNode $typeNode)

Determine whether a conditional target can be preserved without broadening.

at line 951
string
class_basename(int|object|string $class)

Get the class "basename" of the given object / class.

at line 87
array
class_uses_recursive(object|string $class)

Returns all traits used by a class, its parent classes and trait of their traits.

at line 102
collect(null|Arrayable<array<array-key, mixed>>|TValue> $value = [])

Create a collection from the given value.

at line 19
mixed
config(mixed $key = null, mixed $default = null)

Get / set the specified configuration value.

at line 337
string
config_path(string $path = '')

Get the configuration path.

at line 357
bool
conflictsWithFacade(ReflectionClass $facade, MethodTagValueNode|ReflectionMethodDecorator $method)

Determine if the given method conflicts with a Facade method.

at line 1362
Repository)
context(null|array|string $key = null, mixed $default = null)

Get / set the specified context value.

at line 377
csrf_field()

Generate a CSRF token form field.

at line 412
string|null
csrf_token()

Get the CSRF token value.

at line 424
mixed
data_fill(mixed $target, array|int|string $key, mixed $value)

Fill in data where it's missing.

at line 34
mixed
data_forget(mixed $target, null|array|int|string $key)

Remove / unset an item from an array or object using "dot" notation.

at line 201
mixed
data_get(mixed $target, null|array|int|string $key, mixed $default = null)

Get an item from an array or object using "dot" notation.

at line 78
bool
data_has(mixed $target, null|array|int|string $key)

Determine if a key / property exists on an array or object using "dot" notation.

at line 47
mixed
data_set(mixed $target, array|int|string $key, mixed $value, bool $overwrite = true)

Set an item on an array or object using dot notation.

at line 141
string
database_path(string $path = '')

Get the path to the database folder.

at line 440
debug(string $message)

Log the given message when running with --verbose.

at line 247
mixed
decrypt(string $value, bool $unserialize = true)

Decrypt the given value.

at line 456
defer(callable|null $callback = null, string|null $name = null, bool $always = false)

Defer execution of the given callback.

at line 1077
class-string
determineFqcn(string $class, ReflectionClass $source)

Determine the fully qualified class name.

at line 275
dispatch(mixed $job)

Dispatch a job to its appropriate handler.

at line 469
mixed
dispatch_sync(mixed $job, mixed $handler = null)

Dispatch a command to its appropriate handler in the current process.

at line 483
string
e(BackedEnum|DeferringDisplayableValue|Stringable|float|Htmlable|int|string|null $value, bool $doubleEncode = true)

Encode HTML special characters in a string.

at line 122
string
encrypt(mixed $value, bool $serialize = true)

Encrypt the given value.

at line 495
mixed
env(string $key, mixed $default = null)

Gets the value of an environment variable.

at line 144
array
env_array(string $key, array $default = [])

Get a comma-separated environment variable as an array.

at line 157
mixed
env_or_fail(string $key)

Get a required environment variable.

at line 169
mixed
event(mixed ...$args)

Dispatch an event and call the listeners.

at line 505
exceptionHandler(Throwable $exception)

Handle the uncaught exceptions.

at line 236
never
failGeneratedConstantTyping(string $message)

Report a generated constant typing failure.

at line 11
Generator
fake(string|null $locale = null)

Get a faker instance.

at line 515
bool
filled(mixed $value)

Determine if a value is "filled".

at line 185
string
flattenConditionalBranches(string $if, string $else)

Flatten, collapse, and deduplicate resolved conditional branches.

at line 1021
fluent(null|iterable|object $value = null)

Create a Fluent object from the given value.

at line 197
bool
fulfillsBuiltinInterface(MethodTagValueNode|ReflectionMethodDecorator $method)

Determine if the method is for a builtin contract.

at line 1313
string|null
getModelForGuard(string $guard)

Get the model class for a guard.

at line 15
int|string|null
getPermissionsTeamId()

Get the current permissions team id.

at line 35
mixed
head(array $array)

Get the first element of an array. Useful for method chaining.

at line 236
inertia(string|null $component = null, array|Arrayable|ProvidesInertiaProperties $props = [])

Inertia helper.

at line 19
Response
inertia_location(string $url)

Inertia location helper.

at line 37
string
inferValueType(mixed $value)

Infer a PHPDoc-friendly type string from a concrete PHP value.

at line 927
void
info(Arrayable|Jsonable|Stringable|array|string $message, array $context = [], bool $callerLocation = false)

Write some information to the log.

at line 539
bool
isArrayRefinementType(string $name)

Determine whether the identifier is an array refinement.

at line 814
bool
isBuiltIn(string $type)

Determine if the type is a built-in.

at line 1119
bool
isDeprecated(MethodTagValueNode|ReflectionMethodDecorator $method)

Determine if the method is deprecated.

at line 1298
bool
isIgnorablePhpToken(PhpToken $token)

Determine whether a PHP token can be ignored while reading syntax.

at line 1575
bool
isIntegerRefinementType(string $name)

Determine whether the identifier is an integer refinement.

at line 806
bool
isInternal(MethodTagValueNode|ReflectionMethodDecorator $method)

Determine if the method is marked as @internal.

at line 1283
bool
isKnownOptionalDependency(string $type)

Determine if the type is known optional dependency.

at line 1134
bool
isMagic(MethodTagValueNode|ReflectionMethodDecorator $method)

Determine if the method is magic.

at line 1272
bool
isStringRefinementType(string $name)

Determine whether the identifier is a string refinement.

at line 798
string
lang_path(string $path = '')

Get the path to the language folder.

at line 554
mixed
last(array $array)

Get the last element from an array.

at line 249
object
lazy(string|Closure $class, Closure|int $callback = 0, int $options = 0, array $eager = [])

Create a lazy instance.

at line 21
mixed
literal(...$arguments)

Return a new literal or anonymous object using named arguments.

at line 209
LoggerInterface|null
logger(Arrayable|Jsonable|Stringable|array|string|null $message = null, array $context = [])

Log a debug message to the logs.

at line 572
LoggerInterface|LogManager
logs(string|null $driver = null)

Get a log driver instance.

at line 591
string|null
mergeDocblockTypeWithNativeNullability(string|null $docblockType, string|null $nativeType)

Merge the docblock-resolved type string with the native reflection type, preserving the docblock's precision while honoring native nullability.

at line 1080
method_field(string $method)

Generate a form field to spoof the HTTP verb used by forms.

at line 601
int|null
nextSignificantPhpTokenIndex(array $tokens, int $offset)

Return the next significant PHP token index.

at line 1585
array|MethodTagValueNode
normaliseDetails(MethodTagValueNode|ReflectionMethodDecorator $method)

Normalise the method details into a easier format to work with.

at line 1381
CarbonInterface
now(UnitEnum|DateTimeZone|string|null $tz = null)

Create a new configured Carbon instance for the current time.

at line 613
($key is null|""|TValue : mixed)
object_get(TValue $object, null|bool|int|string $key, mixed $default = null)

Get an item from an object using "dot" notation.

at line 230
mixed
old(string|null $key = null, mixed $default = null)

Retrieve an old input item.

at line 623
TReturnType
once(callable $callback)

Ensures a callable is only called once, and returns the result on subsequent calls.

at line 259
TReturn))
optional(TValue $value = null, callable|null $callback = null)

Provide access to optional objects.

at line 281
array
parseClassUseSegments(array $segments, string $prefix = '')

Convert parsed use segments into an alias map.

at line 1678
array
parseClassUseStatement(array $tokens)

Parse the class imports from one namespace-level use statement.

at line 1602
PhpDocNode
parseDocblock(string $docblock)

Parse the given docblock.

at line 448
mixed|void
policy(object|string $class)

Get a policy instance for a given class.

at line 636
mixed
precognitive(callable|null $callable = null)

Handle a Precognition controller hook.

at line 646
string
preg_replace_array(string $pattern, array $replacements, string $subject)

Replace a given pattern with each value in the array sequentially.

at line 299
object
proxy(string|Closure $class, Closure|int $callback = 0, int $options = 0, array $eager = [])

Create a lazy proxy instance.

at line 69
string
public_path(string $path = '')

Get the path to the public folder.

at line 671
void
publishAaguids(string $destination, string $contents)

Publish the generated AAGUID catalogue atomically.

at line 8
redirect(string|null $to = null, int $status = 302, array $headers = [], bool|null $secure = null)

Get an instance of the redirector or create a redirect response.

at line 689
void
report(string|Throwable $exception, array $context = [], string|null $level = null)

Report an exception.

at line 706
void
report_if(bool $boolean, string|Throwable $exception, array $context = [], string|null $level = null)

Report an exception if the given condition is true.

at line 723
void
report_unless(bool $boolean, string|Throwable $exception, array $context = [], string|null $level = null)

Report an exception unless the given condition is true.

at line 738
mixed
request(array|string|null $key = null, mixed $default = null)

Get an instance of the current request or an input item from the request.

at line 754
TFallback|TValue
rescue(callable $callback, TFallback|TFallback $rescue = null, bool|Throwable): bool $report = true)

Catch a potential exception and return a default value.

at line 782
TClass : mixed)
resolve(string $name, array $parameters = [])

Resolve a service from the container.

at line 808
string|null
resolveCanonicalClassName(string $name)

Resolve the canonical name of an existing class.

at line 311
null|string
resolveClassConstantClass(string $className, ReflectionClassDocblockContext|ReflectionMethodDecorator $method)

Resolve the target class for a ConstFetchNode's className reference.

at line 907
Collection<string, class-string>
resolveClassImports(ReflectionClass $class)

Resolve the classes imports.

at line 1487
string
resolveConstFetchType(ConstFetchNode $node, ReflectionClassDocblockContext|ReflectionMethodDecorator $method)

Resolve the inferred PHP type of a class-constant fetch such as Foo::BAR or a wildcard like Foo::PREFIX_*.

at line 831
ConstExprArrayNode
resolveDefaultArrayNode(array $value, string $context)

Resolve an array into a PHPDoc constant-expression node.

at line 1793
string
resolveDefaultValue(array $parameter, string $facade, string $declaringClass, string $method)

Resolve the default value for the parameter.

at line 1741
ConstExprNode
resolveDefaultValueNode(mixed $value, string $context)

Resolve a PHP value into a PHPDoc constant-expression node.

at line 1758
MethodTagValueNode>
resolveDocMethods(ReflectionClass $class)

Resolve the classes referenced methods in the @methods docblocks.

at line 355
ReflectionClass>
resolveDocMixins(ReflectionClass $class, Collection<class-string> $encountered = new Collection())

Recursively resolve docblock mixins.

at line 1237
null|string
resolveDocParamType(ReflectionMethodDecorator $method, ReflectionParameter $parameter)

Resolve the parameters type from the @param docblocks.

at line 393
Collection<int, string>
resolveDocParameters(ReflectionMethodDecorator $method)

Resolve the classes referenced methods in the @methods docblocks.

at line 1260
Collection<class-string>
resolveDocSees(ReflectionClass $class)

Resolve the classes referenced in the docblocks.

at line 343
Collection<string>
resolveDocTags(string $docblock, string $tag)

Resolve the docblock tags.

at line 1199
null|string
resolveDocblockTypes(ReflectionClassDocblockContext|ReflectionMethodDecorator $method, TypeNode $typeNode, int $depth = 1)

Resolve the types from the docblock.

at line 483
array
resolveDocblockUnionMembers(ReflectionClassDocblockContext|ReflectionMethodDecorator $method, TypeNode $typeNode, int $depth)

Resolve and flatten the members of a PHPDoc union.

at line 733
Collection<int, string>
resolveIgnoredMethods(ReflectionClass $facade)

Resolve method names that should be excluded from a facade docblock.

at line 1217
resolveImportSource(ReflectionClassDocblockContext|ReflectionMethodDecorator $method)

Resolve the class whose file should be scanned for use imports when resolving types inside a method's docblock. When a method was inherited from a trait, the exact direct or nested trait source range holds the relevant use statements.

at line 1430
string
resolveKeyOrValueOf(ConstFetchNode $node, ReflectionClassDocblockContext|ReflectionMethodDecorator $method, bool $keyType)

Resolve key-of<...> / value-of<...> when the inner type is a ConstFetchNode.

at line 868
MethodTagValueNode|ReflectionMethodDecorator>
resolveMethods(ReflectionClass $class)

Resolve the classes methods.

at line 1345
string
resolveName(MethodTagValueNode|ReflectionMethodDecorator $method)

Resolve the methods name.

at line 1332
array
resolveNestedTraits(ReflectionClass $class, array $resolved = [])

Resolve every direct and nested trait used by a class.

at line 1464
DynamicParameter|ReflectionParameter>
resolveParameters(ReflectionMethodDecorator $method)

Resolve the parameters for the method.

at line 1412
Collection<class-string>
resolveProxies(ReflectionClass $class)

Resolve the proxies for the Facade.

at line 262
string|null
resolveRelativeClassName(ReflectionClassDocblockContext|ReflectionMethodDecorator $method, string $name)

Resolve a class name relative to the method that declares it.

at line 325
null|string
resolveReturnDocType(ReflectionMethodDecorator $method)

Resolve the return type from the @return docblock.

at line 427
string|null
resolveTemplateType(ReflectionClassDocblockContext|ReflectionMethodDecorator $method, string $name, int $depth)

Resolve a method template type by name.

at line 778
null|string
resolveType(ReflectionMethodDecorator $method, null|ReflectionType $type)

Resolve the declared type.

at line 1148
string
resource_path(string $path = '')

Get the path to the resources folder.

at line 818
response(mixed $content = null, int $status = 200, array $headers = [])

Return a new response from the application.

at line 838
TValue
retry(array<int, float|int>|int $times, callable $callback, CarbonInterval|CarbonInterval|float|int)|float|int $sleepMilliseconds = 0, null|Throwable): bool $when = null)

Retry an operation a given number of times.

at line 321
string
route(BackedEnum|string $name, mixed $parameters = [], bool $absolute = true)

Generate the URL to a named route.

at line 856
string
secure_asset(string $path)

Generate an asset path for the application.

at line 866
string
secure_url(string $path, mixed $parameters = [])

Generate a HTTPS URL for the application.

at line 876
mixed
session(array|UnitEnum|string|null $key = null, mixed $default = null)

Get / set the specified session value.

at line 890
void
setPermissionsTeamId(int|string|Model|null $id)

Set the current permissions team id.

at line 25
string
shortenImportedGlobalTypes(string $method, Collection<string, class-string> $imports)

Shorten global method types already imported by the facade.

at line 1728
array
splitClassUseSegments(array $tokens)

Split use-statement tokens into comma-separated imports.

at line 1649
array
splitTopLevelTypes(string $type, string $separator = '|')

Split a type string on a top-level separator while preserving separators inside angle brackets or parentheses.

at line 1037
string
storage_path(string $path = '')

Get the path to the storage folder.

at line 910
Stringable)
str(null|string $string = null)

Get a new stringable object from the given string.

at line 367
TValue)
tap(TValue $value, null|TValue): mixed $callback = null)

Call the given Closure with the given value then return the value.

at line 403
TValue
throw_if(TValue $condition, TExceptionValue|TExceptionValue $exception = 'RuntimeException', TParams ...$parameters)

Throw the given exception if the given condition is true.

at line 433
TValue
throw_unless(TValue $condition, TExceptionValue|TExceptionValue $exception = 'RuntimeException', TParams ...$parameters)

Throw the given exception unless the given condition is true.

at line 469
to_action(array|string $action, mixed $parameters = [], int $status = 302, array $headers = [])

Create a new redirect response to a controller action.

at line 926
to_route(string $route, mixed $parameters = [], int $status = 302, array $headers = [])

Create a new redirect response to a named route.

at line 936
CarbonInterface
today(UnitEnum|DateTimeZone|string|null $tz = null)

Create a new configured Carbon instance for the current date.

at line 946
array
trait_uses_recursive(object|string $trait)

Returns all traits used by a trait and its traits.

at line 484
array|string|Translator
trans(string|null $key = null, array $replace = [], string|null $locale = null)

Translate the given message.

at line 958
string
trans_choice(string $key, Countable|array|float|int $number, array $replace = [], string|null $locale = null)

Translates the given message based on a count.

at line 975
TReturn)
transform(TValue $value, callable $callback, TDefault|TDefault $default = null)

Transform the given value if it is present.

at line 509
Uri
uri(UriInterface|Stringable|array|string $uri, mixed $parameters = [], bool $absolute = true)

Generate a URI for the application.

at line 1003
string|UrlGenerator
url(string|null $path = null, mixed $parameters = [], bool|null $secure = null)

Generate a URL for the application.

at line 1023
validator(array|null $data = null, array $rules = [], array $messages = [], array $attributes = [])

Create a new Validator instance.

at line 1041
TValue
value(TValue|TValue $value, TArgs ...$args)

Return the default value of the given value.

at line 266
view(string|null $view = null, array|Arrayable $data = [], array $mergeData = [])

Get the evaluated view contents for the given view.

at line 1059
TDefault|TValue))
when(mixed $condition, TValue|TValue $value, TDefault|TDefault $default = null)

Return a value if the given condition is true.

at line 286
bool
windows_os()

Determine whether the current environment is Windows based.

at line 527
TReturn)
with(TValue $value, callable|null $callback = null)

Return the given value, optionally passed through the given callback.

at line 544

Exceptions